﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BattleThis.Core.Battle
{
	public class UnitTypeInfluance : IBattleInfluence
	{
		public float Calculate( BattleContext context )
		{
			if( context.Attacker.Balance.Effective.Contains( context.Defender.Type ) )
			{
				return (int)( context.Attacker.Weapon.Damage * 0.5f );
			}

			return (int)( context.Attacker.Weapon.Damage * -0.2f );
		}

	}
}